#pragma once
#include <OgreRoot.h>
#include <OgreException.h>
#include <OgreConfigFile.h>
#include <OgreCamera.h>
#include <OgreViewport.h>
#include <OgreSceneManager.h>
#include <OgreRenderWindow.h>
#include <OgreEntity.h>
#include <OgreWindowEventUtilities.h>
#include <OISEvents.h>
#include <OISInputManager.h>
#include <OISKeyboard.h>
#include <OISMouse.h>
#include "Level1.h";
#include "Input.h";
 
class GameMain : public Ogre::FrameListener
{
public:
	GameMain(void);
	~GameMain(void);
	bool go(void);
	void KeyPressed(const OIS::KeyEvent& evt);
	void KeyReleased(const OIS::KeyEvent& evt);
	void MouseMoved(const OIS::MouseEvent& evt);
	void MousePressed(const OIS::MouseEvent& evt, OIS::MouseButtonID id);
	void MouseReleased(const OIS::MouseEvent& evt, OIS::MouseButtonID id);

protected:
	Ogre::RaySceneQuery *mRaySceneQuery;// The ray scene query pointer
	// Ogre::FrameListener
	virtual bool frameRenderingQueued(const Ogre::FrameEvent& evt);
	virtual void createFrameListener(void);

private:
    Ogre::Root* mRoot;
    Ogre::String mPluginsCfg;
	Ogre::String mResourcesCfg;
	Ogre::RenderWindow* mWindow;
	Ogre::SceneManager* mSceneMgr;
	Ogre::Camera* mCamera;
	Level1* mLevel;
	Input* mInputMgr;
	bool mShutDown;
	Ogre::Real mRotate;          // The rotate constant
    Ogre::Real mMove;            // The movement constant
    Ogre::SceneNode *mCamNode;   // The SceneNode the camera is currently attached to
    Ogre::Vector3 mDirection;    // Value to move in the correct direction
};

